package com.hl.sfzy.mapper.consult;


import com.hl.sfzy.entity.User;
import com.hl.sfzy.entity.consutQA.Problem;
import com.hl.sfzy.entity.consutQA.Reply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ConsultMapper {
    List<Problem> findByAllProblems();

    List<Reply> findAllComment(@Param("pid") Long pid);

    Problem findProblemById(Long pid);

    int addProblem(Problem problem);


    User getUsers(@Param("id") Long uid);

    User getProblemUser(@Param("id") Long uid);

    long getProblemReplyCound(@Param("pid") Long pid);

    int deleteProblem(@Param("id") Long id);

    int insertProblemComment(Reply reply);
}
